import { ref } from 'vue'
import { defineStore } from 'pinia'
import { getCategoryAPI }  from '@/apis/layoutAPI';

export const useCategoryStore = defineStore('category', () => {
    const categoryList = ref([]);
    const getCategory = async () =>{
      //业务逻辑

      //调用接口
      const res = await getCategoryAPI();
      categoryList.value = res.data;


    }
    return { categoryList, getCategory }
})
